package com.sz.web.account.mapper;

import com.sz.web.account.entity.AccountUser;
import com.sz.web.common.mapper.MyMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface AccountUserMapper extends MyMapper<AccountUser> {

    @Select("select count(*) from account_user u LEFT JOIN account_user_role ur ON u.id=ur.user_id LEFT JOIN account_role r ON ur.role_id = r.id where r.role_name='管理员'")
   int selectManager();

    @Select("select id,create_time,update_time,account,password,username,email,mobile_phone from account_user where account = #{account} ")
    AccountUser selectByAccount(@Param("account") String account);
}
